Emit AccountPtr from pushNotificationsDisabled in Account rather than raw pointer
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 22 Mar 2023 13:53:06 +0000 (14:53 +0100)
committerJyrki Gadinger <nilsding@nilsding.org>
Tue, 15 Apr 2025 12:13:34 +0000 (14:13 +0200)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/libsync/account.cpp
src/libsync/account.h

index cf59af7d507e77d31a8e530fd43644ea2d9864d9..5acb7897bb6e5eb61cac7f211cb8aa643c44320c 100644 (file)
@@ -341,7 +341,7 @@ void Account::trySetupPushNotifications()
                     return;
                 }
                 if (!_pushNotifications->isReady()) {
-                    emit pushNotificationsDisabled(this);
+                    emit pushNotificationsDisabled(sharedFromThis());
                 }
                 if (!_pushNotificationsReconnectTimer.isActive()) {
                     _pushNotificationsReconnectTimer.start();
index ae119758f755889584d70a104d0d1355fb005d01..5e6c67318fb6d177c3843f98526fe0560fa7cbb9 100644 (file)
@@ -461,7 +461,7 @@ signals:
     void appPasswordRetrieved(QString);
 
     void pushNotificationsReady(const OCC::AccountPtr &account);
-    void pushNotificationsDisabled(OCC::Account *account);
+    void pushNotificationsDisabled(const OCC::AccountPtr &account);
 
     void userStatusChanged();